package com.neouton.crm.receiptRecords.mapper;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.neouton.crm.entity.SysUserEntity;
import com.neouton.crm.payRecords.entity.PaymentRecords;
import com.neouton.crm.payRecords.entity.PaymentRequest;
import com.neouton.crm.pm.entity.PurchaseOrderVO;
import com.neouton.crm.receiptRecords.entity.ReceiptRecords;
import com.neouton.crm.receiptRecords.entity.ReceiptTable;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Mose
* @description 针对表【receipt_records(收票记录)】的数据库操作Mapper
* @createDate 2023-02-07 09:23:08
* @Entity server.ReceiptRecords
*/
@Mapper
public interface ReceiptRecordsMapper {

    void saveReceiptRecords(@Param("vo")ReceiptRecords receiptRecords);

    List<ReceiptRecords> getReceiptRecordsByPurchaseOrderIds(@Param("poIds")List<Integer> list);
    //供应商视图接口查询
    List<ReceiptRecords> getReceiptRecordsByPurchaseIdAndSupplierId(@Param("poIds")List<Integer> ids, @Param("supplierId")int supplierId);

    List<ReceiptRecords> queryReceiptRecordedMoney(@Param("vo")ReceiptRecords receiptRecords);

    void updateReceiptRecordsById(@Param("vo") ReceiptRecords receiptRecords);

    void updateReceiptTableDataById(@Param("List") List<ReceiptTable> list,@Param("receiptRecordsId") Integer receiptRecordsId);

    void updateReceiptTableDataByPRId(@Param("List") List<ReceiptTable> list,@Param("payRecordsId") Integer payRecordsId);

    ReceiptRecords queryReceiptRecordInfoById(@Param("receiptRecordsId")Integer receiptRecordsId);

    void backUpReceiptRecord(@Param("receiptRecordsId")Integer receiptRecordsId, @Param("backUserId")Integer userId);

    void backUpReceiptTable(@Param("receiptRecordsId")Integer receiptRecordsId,@Param("backUserId")Integer userId);

    void backUpPRReceiptTable(@Param("payRecordsId")Integer payRecordsId,@Param("backUserId")Integer userId);

    ReceiptRecords queryReceiptRecordedHistory(Integer approvalId);


    List<ReceiptRecords> queryReceiptRecordsByProjectId(@Param("projectId") Integer projectId);

    IPage<ReceiptRecords> queryReceiptRecordsListInfo(@Param("page") IPage page, @Param("entity")ReceiptRecords entity, @Param("userList") List<SysUserEntity> userList);

    List<ReceiptRecords> queryReceiptRecordsListInfo(@Param("entity")ReceiptRecords entity, @Param("userList") List<SysUserEntity> userList);

    void saveReceiptTable(@Param("List")List<ReceiptTable> list);

    List<ReceiptTable> queryReceiptTablesByIdAndPlanPeriod(@Param("vo")ReceiptTable entity);

    List<ReceiptTable> queryReceiptTablesByApprovalId(Integer approvalId);

    void updateReceiptTableData(@Param("List") List<ReceiptTable> list,@Param("approvalId")Integer approvalId);

    List<ReceiptTable> getReceiptTableDataByReceiptId(Integer receiptRecordsId);

    List<ReceiptRecords> queryReceiptRecordedMoneyHistory(@Param("vo")ReceiptRecords receiptRecords);

    void updateReceiptRecordsProjectIdByOpId(@Param("projectId") Integer projectId, @Param("opId") Integer opId);

    Boolean deleteReceiptRecordById(Integer receiptRecordsId);
}




